
@ECHO off
REM
REM Script to perform CSP Post implementation steps
REM Last Updated: 11/2/05

if "%1" == "/?" GOTO Help
if "%1" == "" GOTO Help

if EXIST "%commonprogramfiles%\Microsoft Shared Debug\web server extensions\12\BIN\stsadm.exe" (
     SET STSADM="%commonprogramfiles%\Microsoft Shared Debug\web server extensions\12\BIN\stsadm.exe"
)

if EXIST "%commonprogramfiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" (
     SET STSADM="%commonprogramfiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
)

if NOT EXIST %STSADM% (
    ECHO Error:  STSADM.EXE cannot be found in your system.
    GOTO Error
    )
ECHO.
ECHO Configuring %1 ...

%STSADM% -o activatefeature -name CSP_CrmConnector -url %1
if NOT %ERRORLEVEL% == 0 (
        ECHO Error:  Error running stsAdm
        GOTO Error
        )

ECHO.
ECHO ********************************
ECHO %1 has been configured
ECHO ********************************
ECHO.
GOTO End

:Error
ECHO.
ECHO ********************************
ECHO Failed!
ECHO ********************************
ECHO.
PAUSE
GOTO End

:Help
ECHO.
ECHO The command line syntax:
ECHO    PostImplementationSteps http://<internet_web_application_url> http://<intranet_web_application_url> http://<central_web_application_url>
ECHO.
ECHO Examples:
ECHO    C:\PostImplementationSteps http://<internet_web_application_url> http://<intranet_web_application_url> http://<central_web_application_url>
PAUSE
GOTO End
:End